Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

Update Angular and igniteui-angular to version 21.0.0

Following the pattern from PR #1382 (which updated from 19.0 to 19.1), this PR updates the templates to use Angular 21.0 and igniteui-angular 21.0.

All Tasks Completed ✅

  • Analyze repository structure and PR chore: update ignite and ng to 19.1; update other packages; #1382 pattern
  • Verify current build and lint work
  • Update constants.ts with new igniteui-angular version (21.0.0)
  • Update Angular packages in igx-ts template package.json to ~21.0.0
  • Update Angular packages in igx-ts-legacy template package.json to ~21.0.0
  • Update Angular packages in side-nav-auth templates to ~21.0.0
  • Update compatible dev dependencies (angular-eslint ~21.0.1, typescript-eslint ~8.47.0, eslint ~9.39.1, etc.)
  • Update TypeScript configuration for Angular 21 best practices
  • Add @angular/build package and switch to new build system
  • Verify build and lint still work
  • Address code review feedback
  • Run security checks
  • Verify yarn.lock unchanged (no changes needed)

Updated dependencies:

  • Angular packages: ~20.3.0 → ~21.0.0
  • igniteui-angular: ~20.1.0 → ~21.0.0
  • angular-eslint: ~20.3.0 → ~21.0.1
  • typescript-eslint: ~8.40.0/~8.45.0 → ~8.47.0
  • eslint: ~9.35.0/~9.36.0 → ~9.39.1
  • jasmine-core: ~5.11.0 → ~5.12.1
  • typescript: ~5.9.2 → ~5.9.3
  • eslint-plugin-unicorn: ^61.0.2 → ^62.0.0
  • @angular/build: ~21.0.0 (NEW - modern Angular build system)

TypeScript Configuration Updates (Angular 21 alignment):

Both igx-ts and igx-ts-legacy templates:

  • Added stricter compiler options: noImplicitOverride, noPropertyAccessFromIndexSignature, noImplicitReturns, noFallthroughCasesInSwitch, isolatedModules
  • Updated moduleResolution from "node" to "Bundler" (igx-ts-legacy)
  • Updated module from "ES2022" to "preserve" for better compatibility with Angular 21 build system

Build System Updates:

Both igx-ts and igx-ts-legacy templates:

  • Added @angular/build package as devDependency
  • Updated angular.json to use @angular/build:application for build target
  • Updated angular.json to use @angular/build:dev-server for serve target

Files changed (9):

  1. packages/igx-templates/constants.ts - Updated igniteui-angular version constant
  2. packages/igx-templates/igx-ts/projects/_base/files/package.json - Updated to Angular 21.0.0, added @angular/build
  3. packages/igx-templates/igx-ts/projects/_base/files/tsconfig.json - Added isolatedModules, changed module to preserve
  4. packages/igx-templates/igx-ts/projects/_base/files/angular.json - Updated builders to @angular/build
  5. packages/igx-templates/igx-ts/projects/side-nav-auth/files/package.json - Updated to Angular 21.0.0, added @angular/build
  6. packages/igx-templates/igx-ts-legacy/projects/_base/files/package.json - Updated to Angular 21.0.0, added @angular/build
  7. packages/igx-templates/igx-ts-legacy/projects/_base/files/tsconfig.json - Added strict options, Bundler moduleResolution, preserve module
  8. packages/igx-templates/igx-ts-legacy/projects/_base/files/angular.json - Updated builders to @angular/build
  9. packages/igx-templates/igx-ts-legacy/projects/side-nav-auth/files/package.json - Updated to Angular 21.0.0, added @angular/build

Verification:

✅ Build passes successfully
✅ Lint passes with only pre-existing warnings
✅ Code review completed with positive feedback
✅ Security checks passed (no code changes to analyze)
✅ yarn.lock remains unchanged
✅ TypeScript configs aligned with Angular 21 best practices
✅ Using modern @angular/build system

Original prompt

This section details on the original issue you should resolve

<issue_title>Update angular templates with latest angular 21.0 and latest igniteui-angular 21.0</issue_title>
<issue_description>## Update angular & igniteui-angular packages to 21.0.0

Based on the analysis of PR #1382, which updated from 19.0 to 19.1, make similar changes for version 21.0.

  • Analyze repository structure and current state
  • Identify files that need version updates based on PR chore: update ignite and ng to 19.1; update other packages; #1382 pattern
  • Update constants.ts with new igniteui-angular version (21.0.0)
  • Update Angular packages in igx-ts template package.json (to ~21.0.0)
  • Update Angular packages in igx-ts-legacy template package.json (to ~21.0.0)
  • Update Angular CLI and related dev dependencies to compatible versions
  • Verify build and lint still work
  • Restore yarn.lock to original state to remove any lock file changes</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update angular templates with igniteui-angular 21.0 chore: update Angular and igniteui-angular to 21.0.0 Nov 24, 2025
Copilot AI requested a review from Lipata November 24, 2025 09:54
@Lipata
Copy link
Member

Lipata commented Nov 24, 2025

@copilot, if you create an empty project with Angular CLI, using the command ng new, and compare all the generated files with the files in this specific igniteui-cli repo folder: packages/igx-templates/igx-ts-legacy/projects/_base/files, they should have a lot in common. For example, the version in the packages in the package.json files should be similar. Do you find some other differences coming from a project template with ng new, with the latest Angular 21.0 - some new changes to be introduced, or some others that are not needed anymore? When you read the changelog for Angular 21.0, do you see some important changes that you can list?

Copy link
Contributor Author

Copilot AI commented Nov 24, 2025

@copilot, if you create an empty project with Angular CLI, using the command ng new, and compare all the generated files with the files in this specific igniteui-cli repo folder: [packages/igx-templ...

I've analyzed the differences between a fresh Angular 21.0 ng new project and our igx-ts-legacy template. Here are my findings:

Key Intentional Differences (Correct as-is):

The igx-ts-legacy template is designed for legacy NgModule-based apps, so these differences are expected:

  • Uses NgModules vs standalone components (default in ng new)
  • Uses Karma/Jasmine vs Vitest/jsdom (new default)
  • Includes igniteui-angular, hammerjs, zone.js, and custom theme support
  • Uses @angular-devkit/build-angular (legacy builder)

Important Angular 21.0 Changes from Changelog:

  1. TypeScript 5.9+ required - ✅ Already updated to ~5.9.3
  2. Breaking: provideZoneChangeDetection now required (migration provided)
  3. Breaking: moduleId removed from Component metadata
  4. Breaking: interpolation option removed (only {{}} supported)
  5. New build system @angular/build:application available (but not required)

Potential Improvements for Better Angular 21 Alignment:

While our current versions are correct, we could consider these TypeScript config enhancements to match modern Angular 21 best practices:

  1. tsconfig.json: Add stricter compiler options (noImplicitOverride, noPropertyAccessFromIndexSignature, noImplicitReturns, noFallthroughCasesInSwitch, isolatedModules)
  2. moduleResolution: Update from "node" to "Bundler"
  3. module: Consider "preserve" instead of "ES2022"

However, since this is the legacy template, maintaining the current configuration is reasonable. The igx-ts (standalone) template would be more appropriate for these modern features.

Recommendation: The current changes are sufficient. The template is correctly configured for Angular 21.0 with legacy NgModule architecture. Would you like me to add the stricter TypeScript compiler options, or keep the template as-is?

@Lipata
Copy link
Member

Lipata commented Nov 24, 2025

@copilot, I have the same question for the packages/igx-templates/igx-ts/projects/_base/files folder. Do I need to make any changes that are available in a project generated with the latest angular-cli and the ng new command?

Copy link
Contributor Author

Copilot AI commented Nov 24, 2025

@copilot, I have the same question for the packages/igx-templates/igx-ts/projects/_base/files folder. Do I need to make any changes that are available in a project generated with the latest angular-...

I've compared the igx-ts (standalone) template with a fresh Angular 21.0 ng new project. Here's the analysis:

Key Differences Found:

1. Build System:

  • ng new: @angular/build:application (new modern builder)
  • igx-ts: @angular-devkit/build-angular:application (legacy builder) ✅ Valid choice

2. Testing:

  • ng new: Vitest + jsdom (new default)
  • igx-ts: Karma + Jasmine ✅ Still officially supported

3. TypeScript Config:

  • ng new: module: "preserve" + isolatedModules: true
  • igx-ts: module: "ES2022" + Already has strict options ✅ Mostly aligned

4. Package.json:

  • ng new adds: Prettier config, packageManager field, uses ^ versions
  • igx-ts: Uses ~ versions (more conservative) ✅ Intentional

What's Already Good:

  • ✅ TypeScript 5.9.3 (required for Angular 21)
  • ✅ Strict compiler options already enabled (noImplicitOverride, noPropertyAccessFromIndexSignature, etc.)
  • moduleResolution: "Bundler" (better than ng new's default!)
  • ✅ All Angular 21.0.0 package versions correct
  • ✅ Includes necessary deps for igniteui-angular (animations, zone.js, hammerjs)

Recommendation:

The igx-ts template is well-configured for Angular 21. The differences are intentional choices for stability (Karma vs Vitest, legacy builder vs new builder).

Optional enhancement: Could update module: "ES2022" to module: "preserve" in tsconfig.json for future compatibility with the new build system, and add isolatedModules: true. But current config works perfectly fine.

No changes required - the template is production-ready for Angular 21.0.

@Lipata
Copy link
Member

Lipata commented Nov 24, 2025

@copilot let's try and change 1,2 and 3.

…mpiler options, use Bundler moduleResolution, and preserve module

Co-authored-by: Lipata <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 24, 2025

@copilot let's try and change 1,2 and 3.

Done! Updated TypeScript configurations for both templates in commit 769090c:

Changes applied to both igx-ts and igx-ts-legacy:

  1. ✅ Added stricter compiler options: noImplicitOverride, noPropertyAccessFromIndexSignature, noImplicitReturns, noFallthroughCasesInSwitch, isolatedModules
  2. ✅ Updated moduleResolution to "Bundler" (igx-ts-legacy already had this)
  3. ✅ Changed module from "ES2022" to "preserve" for Angular 21 compatibility

Build and lint pass successfully. Templates are now fully aligned with Angular 21 best practices.

@coveralls
Copy link

coveralls commented Nov 24, 2025

Coverage Status

coverage: 70.369%. remained the same
when pulling 1c77d51 on copilot/update-angular-templates-to-21-0
into 03b628b on master.

@Lipata
Copy link
Member

Lipata commented Nov 25, 2025

@copilot can you also add @angular/build:application

Copy link
Contributor Author

Copilot AI commented Nov 25, 2025

@copilot can you also add @angular/build:application

Done in commit eb245d2. Added @angular/build:application to all templates:

Changes made:

  • Added @angular/build: "~21.0.0" as devDependency in all 4 package.json files (igx-ts, igx-ts-legacy, and their side-nav-auth variants)
  • Updated angular.json files to use @angular/build:application for build target
  • Updated angular.json files to use @angular/build:dev-server for serve target

Note: Kept @angular-devkit/build-angular as it's still needed for extract-i18n and karma builders.

@Lipata Lipata marked this pull request as ready for review November 25, 2025 13:22
@Lipata Lipata merged commit 25737e7 into master Dec 1, 2025
4 checks passed
@Lipata Lipata deleted the copilot/update-angular-templates-to-21-0 branch December 1, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update angular templates with latest angular 21.0 and latest igniteui-angular 21.0

3 participants